<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>用户列表</title>
    <link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/color.css">
    <link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/demo/demo.css">
    <script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="https://www.jeasyui.com/easyui/jquery.easyui.min.js"></script>
</head>
<body>
<table id="dg" title="用户列表" class="easyui-datagrid" style="width:100%;height:800px;"
       url="/user/getUserList"
       toolbar="#toolbar" pagination="true"
       rownumbers="true" fitColumns="true" >
    <thead>
    <tr>
        <th field="userId" checkbox="true">id</th>
        <th field="_id" formatter="formatId" >id</th>
        <th field="userName" >用户名称</th>
        <th field="area" >地区</th>
        <th field="address" >详细地址</th>
        <th field="userNumber" >用户编号</th>
        <th field="nation" >民族</th>
        <th field="education" >学历</th>
        <th field="politicalStatus" >政治面貌</th>
        <th field="phone" >手机</th>
        <th data-options="field:'_operate',align:'left',formatter:formatOper">操作</th>
    </tr>
    </thead>
</table>
<div id="toolbar">
    <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="destroyUser()">删除</a>
</div>

<script type="text/javascript">

    function formatOper(val, row, index){
        var astr = '';

        return astr;
    }

    function formatId(value, rec) {
        return rec.userId;
    }

    function formatExceptionStatus(value, rec)
    {
        if(value==1){
            return '<span style="color:red">未查看</span>';
        }
        else if(value == 2){
            return "已查看";
        }
        else {
            return "已处理";
        }
    }

</script>
</body>
</html>